using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using Tao.OpenGl;
using Tao.Platform.Windows;


namespace TaoGL_UserControl
{
    class BgImage : InExPro
    {

        const string conView = "view_2.tga";


        Tex2DUV[] Tuv = null;

        public BgImage()
        {

            string[] strTableImg = { conView };
            //string[] strTableImg = { conBgDown, conBgDownLight };
            Tuv = new Tex2DUV[strTableImg.Length];

            for (int i = 0; i < Tuv.Length; i++)
            {
                Tuv[i] = new Tex2DUV();
                TexMgr.LoadTextureEx(PathMgr.Img+strTableImg[i]);
                Tuv[i].TextureIndex = TexMgr.GetTextureInfo(strTableImg[i]).Index;
                Rectangle rect = TexMgr.GetTextureInfo(strTableImg[i]).rectange;
                Tuv[i].SetSize(rect.Width, rect.Height);
            }





        }
        //======================================================================
        public void Draw()
        {

            foreach (Tex2DUV p in Tuv)
            {
                Gl.glPushMatrix();
                Gl.glLoadIdentity();
                p.Draw();
                Gl.glPopMatrix();
            }


        }



        public void Process(int tm)
        {
       
        }
    }

}
